﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Icoders.MarketTracker.Data.Utils
{
   public static class TimeUtil
    {
       public static DateTime GetDateTime()
       {
           DateTime time = DateTime.UtcNow;
           var timeinfo = TimeZoneInfo.FindSystemTimeZoneById("Arab Standard Time");
           var timeConvert = TimeZoneInfo.ConvertTime(time, timeinfo);
           return timeConvert;
          
       }
       public static DateTime GetLocalDateTime(DateTime utcDate)
       {
           DateTime time = utcDate;
           var timeinfo = TimeZoneInfo.FindSystemTimeZoneById("Arab Standard Time");
           var timeConvert = TimeZoneInfo.ConvertTime(time, timeinfo);
           return timeConvert;
       }
    }
}
